local unitName  =  "Margan_rapture"

local unitDef  =  {
--Internal settings
    BuildPic = "Margan_rapture.png",
    Category = "TANK SMALL NOTAIR NOTSUB",
    ObjectName = "WL_Margan_rapture.s3o",
    name = "Margan Rapture",
    Side = "TANKS",
    TEDClass = "TANK",
    UnitName = "Margan Rapture",
    script = "WL_Margan_Rapture_script.lua",
    Category = [[LAND]],
    iconType = "default",
    
--Unit limitations and properties
    BuildTime = 7000,
    Description = "The Margan T3 Artillery.",
    MaxDamage = 550,
    RadarDistance = 0,
    SightDistance = 600,
    SoundCategory = "TANK",
    Upright = false,
    
--Energy and metal related
    BuildCostEnergy = 7000,
    BuildCostMetal = 550,
    
--Pathfinding and related
    Acceleration = 0.8,
    BrakeRate = 0.1,
    FootprintX = 2,
    FootprintZ = 2,
    MaxSlope = 20,
    MaxVelocity = 0.9,
    MaxWaterDepth = 20,
    MovementClass = "Default2x2",
cantBeTransported=true,
    TurnRate = 400,
    
--Abilities
    Builder = 0,
    CanAttack = 1,
    CanGuard = 1,
    CanMove = 1,
    CanPatrol = 1,
    CanStop = 1,
    LeaveTracks = 0,
    Reclaimable = 0,
    highTrajectory = 2,
    
--Hitbox
--    collisionVolumeOffsets    =  "0 0 0",
--    collisionVolumeScales     =  "20 20 20",
--    collisionVolumeTest       =  1,
--    collisionVolumeType       =  "box",
    
--Weapons and related
    BadTargetCategory = "NOTAIR",
    ExplodeAs = "LARGE_UNIT_EXPLOSION",
    NoChaseCategory = "AIR",

    weapons = {
        [1] = {
            def = "orangeblob",
	     onlyTargetCategory = [[LAND]],
        },
    },
}

local weaponDefs = {
    orangeblob = {
		name = "Plasma artillery cannon",
		weapontype = "Cannon",
		accuracy = 875,
		areaofeffect = 150,
		avoidfeature = false,
		avoidfriendly = true,
		canattackground = true,
		collidefriendly = true,
		collisionsize = 3,
		commandfire = false,
		craterboost = 0,
		cratermult = 0,
		heightboostfactor = 8,
		edgeeffectiveness = 0.1,
		explosionspeed = 20,
		impulseboost = 0,
		impulsefactor = 0.003,
		intensity = 1,
		noselfdamage = true,
           alwaysVisible=1,
		size = 6,
           soundstart = "stormarrow_fire",
	   soundstartvolume=1,
        soundhit = "orangeblob_explo",
		range = 2200,
		reloadtime = 0.75,
		rgbcolor = "1.0 1.0 1.0",
		turret = true,
		texture1 = "purpleflame",
		weaponvelocity = 800, 
		explosiongenerator = "custom:purple_EXPLOSION",
		damage =
		{
			default = 75,
		},
	},
}


unitDef.weaponDefs = weaponDefs
return lowerkeys({ [unitName]  =  unitDef })

